From 5fa2054b19acc694335ba9d1cde718474fc9511f Mon Sep 17 00:00:00 2001 From: robertl Date: Mon, 17 Oct 2005 17:38:12 +0000 Subject: [PATCH] Try to handle PPS fixes in NMEA. --- gpsbabel/nmea.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/gpsbabel/nmea.c b/gpsbabel/nmea.c index a0aa326ea..e0f0bc050 100644 --- a/gpsbabel/nmea.c +++ b/gpsbabel/nmea.c @@ -282,12 +282,16 @@ gpgga_parse(char *ibuf) waypt->hdop = hdop; - if (fix==1) { - waypt->fix = (nsats>3)?(fix_3d):(fix_2d); - } - else if (fix==2) - { - waypt->fix = fix_dgps; + switch (fix) { + case 1: + waypt->fix = (nsats>3)?(fix_3d):(fix_2d); + break; + case 2: + waypt->fix = fix_dgps; + break; + case 3: + waypt->fix = fix_pps + break; } curr_waypt = waypt; @@ -603,6 +607,9 @@ nmea_trackpt_pr(const waypoint *wpt) case fix_2d: fix='1'; break; + case fix_pps: + fix='3'; + break; default: fix='0'; } -- 2.30.2